<?php
namespace Admin\Controller;
use Think\Controller;
class BaseController extends Controller {
    public function _initialize(){
      	$user   = M("Admin");
      	$arr = $user->where("username = '%s'", $_SESSION['username'])->find();
      	if ($_SESSION['username'] == "" || $arr == null || $_SESSION['password'] !=($arr['password'])) {
      	$this->error('非法操作', U('login/index'), 3);
    	}
    }
}